package com.library.book.service;

import com.library.book.po.Department;
import com.library.book.po.User;
import com.library.book.utils.Page;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface UserService {

    List<User> findUserByUserName(String userName);

    List<Department> findAllDepts();

    User userLogin(String userName, String password);

    boolean updateUser(User user, HttpServletRequest request);

    boolean userReturnBook(int bookId, HttpServletRequest request);

    boolean userBorrowingBook(int bookId, HttpServletRequest request);

    User findUserById(int id);

    Page<User> findUserByPage(int pageNum);

    int insertUser(User user);

    int deleteUserById(int userId);
}
